import random
number=[]#空列表
#生成列表
for i in range(8):
    ran=random.randint(1,100)
    number.append(ran)
print(number)

# #翻转
# number.reverse()
# print(number)
#
# #排序
# number.sort()
# print(number)

#冒泡排序
for i in range(0,len(number)-1):
    for j in range(0,len(number)-1-i):
        if number[j]>number[j+1]:
            a=number[j]
            number[j]=number[j+1]
            number[j+1]=a
print(number)